<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>test</title>
    <script th:src="@{/js/jquery-3.1.1.min.js}"></script>
</head>
<body>
<div>
    <input id="url" placeholder="输入完整URL录入文件">
    <button id="inputluru">输入录入</button>
</div>

<div>
    <input id="url2" placeholder="输入完整URL录入文件">
    <button id="inputluru2">输入录入a</button>
</div>

<div id="content">
</div>

</body>


<script th:inline="javascript">

    $(function () {

        $("#inputluru").click(function () {
            $.ajax({
                type: 'get',
                url: '/test/b',
                success: function(data){
                    alert(data.msg);
                },
                error:function(data){
                    alert("出错了！！:"+data.msg);
                }
            });

        })

        $("#inputluru2").click(function () {
            window.location.href = "/test/a";
        })


    })


</script>
</html>